package com.tg.sieve_data.common;

import java.util.HashMap;
import java.util.Map;

public class ResponseResult {
    
    public static Map<String, Object> success(Object data) {
        Map<String, Object> response = new HashMap<>();
        response.put("code", 200);
        response.put("message", "success");
        response.put("result", data);
        return response;
    }

    public static Map<String, Object> error(int code, String message) {
        Map<String, Object> response = new HashMap<>();
        response.put("code", code);
        response.put("message", message);
        response.put("result", new HashMap<>());
        return response;
    }

    public static Map<String, Object> notFound(String message) {
        return error(404, message);
    }

    public static Map<String, Object> badRequest(String message) {
        return error(400, message);
    }

    public static Map<String, Object> serverError(String message) {
        return error(500, message);
    }
} 